import inspect
from traits.api import *
from traitsui.api import *
class Source(HasTraits):
    s=Code()
    traits_view = View(
        UItem('s'),
        width=1000,
        height=1000,
        resizable=True,
    )

def show(code):
    s=Source()
    s.s=inspect.getsource(code)
    s.configure_traits()

if __name__ == '__main__':
    show(inspect)


